package com.team.recruitment_management_system.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@Data
@Schema(description = "Tag信息返回类")
public class TagVo {
    private Integer id;
    private String name;
    private Integer sort;
    private Integer level;
    private Integer parentId;
    private Integer status;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @Schema(description = "创建时间")
    private Date createTime;
    private List<TagVo> children;

    public List<TagVo> getChildren() {
        if (children == null) {
            children = new ArrayList<>();
        }
        return children;
    }
}
